package com.itcp.itelpicture.controller;

import com.itcp.itelpicture.common.BaseResponse;
import com.itcp.itelpicture.common.Result;
import com.itcp.itelpicture.domain.po.Tag;
import com.itcp.itelpicture.service.TagService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * 文章标签接口
 *
 * @author wgzzz
 */
@Slf4j
@RestController
@RequestMapping("/tag")
@RequiredArgsConstructor
public class TagController {

    private final TagService tagService;

    /**
     * 获取所有标签
     * @return
     */
    @GetMapping("/list")
    public BaseResponse<List<Tag>> getTagList() {
        List<Tag> list = tagService.list();
        return Result.success(list);
    }
}







